﻿using PoliticalClassifier.Support;

namespace PoliticalClassifier.Calculations
{
    /// <summary>
    /// SimulationResults contains the results of running the simulation.
    /// </summary>
    internal class SimulationResults : ISimulationResults
    {
        #region Construction
        /// <summary>
        /// Constructs the simulation results with the given data.
        /// </summary>
        /// <param name="overallVoterMedianPoint">The overall median point of voter data.</param>
        /// <param name="normalizationScale">the scale factor that the voter data was scaled down by to fit the normalized range of [-1, 1] in both dimensions.</param>
        /// <param name="candidateResults">The collection of candidate results.</param>
        public SimulationResults(Point2D overallVoterMedianPoint, int normalizationScale, CandidateResultsCollection candidateResults)
        {
            OverallVoterMedianPoint = overallVoterMedianPoint;
            NormalizationScale = normalizationScale;
            CandidateResults = candidateResults;
        }
        #endregion

        #region Public Properties
        /// <summary>
        /// Gets the scale factor that the voter data was scaled down by to fit the 
        /// normalized range of [-1, 1] in both dimensions.
        /// </summary>
        public int NormalizationScale { get; set; }

        /// <summary>
        /// Gets or sets the overall voter median point.
        /// </summary>
        public Point2D OverallVoterMedianPoint { get; set; }

        /// <summary>
        /// Gets or sets the collection of candidate results.
        /// </summary>
        public CandidateResultsCollection CandidateResults { get; set; }
        #endregion
    }
}
